[5.9] Add convert to trailing closure and editor placeholder refactorings#1806
Merged
bnbarham merged 6 commits intoswiftlang:release/5.9from Jun 21, 2023
Merged
Conversation
Contributor
bnbarham
commented
Jun 16, 2023
- Explanation: Adds a placeholder expansion refactoring. Also cherry-picks a few incremental parse cherry-picks for fewer conflicts, but nothing is using incremental parsing at the moment
- Scope: Refactorings
- Risk: Low. Adds a new refactoring to expand placeholders.
- Testing: Various new tests for expanding placeholders
- Original PR: Add convert to trailing closure and editor placeholder refactorings #1485
Contributor
Author
|
swiftlang/swift-stress-tester#239 @swift-ci please test |
bnbarham
commented
Jun 17, 2023
This change is used to help us mark the changes in source file, which makes incremental parsing test easier. (cherry picked from commit b605766)
(cherry picked from commit 259542b)
We now properly strip trailing whitespace. Add in spacing after `{` and
before `}`.
(cherry picked from commit 195823b)
This was called `SourceEdit`, which would be nice to reserve for refactorings rather than incremental parsing. Ideally we'd also move all the incremental parsing types into `SwiftParser` as well. (cherry picked from commit 40f2954)
This adds an additional text-based refactoring provider which the original syntax-based provider now implements. This allows refactorings that produce text rather than a full tree. (cherry picked from commit bcf0d1f)
Adds three new refactorings: - `ConvertToTrailingClosures` - `ExpandEditorPlaceholder` - `ExpandEditorPlaceholders` `ExpandEditorPlaceholders` is a combination of `ExpandEditorPlaceholder` and `ConvertToTrailingClosures`, ie. it first expands any function-typed closures at the end of a call using `ExpandEditorPlaceholder` and then runs `ConvertToTrailingClosures` on that call. Resolves rdar://107532856. (cherry picked from commit c70e54a)
d66b191 to
3959af0
Compare
Contributor
Author
|
swiftlang/swift-stress-tester#239 @swift-ci please test |
Contributor
Author
|
swiftlang/swift-stress-tester#239 @swift-ci please test Windows platform |
DougGregor
approved these changes
Jun 21, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.